<?php  				
// 错误信息
	
?>
<form id="pagerForm" method="post" action="<?=site_url($this->uri->uri_string())?>">
	<input type="hidden" name="pageNum" value="1" />
	<input type="hidden" name="orderField" value="${param.orderField}" />
	<input type="hidden" name="orderDirection" value="${param.orderDirection}" />
</form>

<div class="pageHeader">
	<form rel="pagerForm" onsubmit="return navTabSearch(this);" action="<?=site_url($this->uri->uri_string())?>" method="post">
	<div class="searchBar">
		<ul class="searchContent">
			<li>
				<label>搜索菜谱：</label>
				<input type="text" name="keywords" value="<?=$keywords?>"/>
			</li>
			<li>
			<select class="combox" name="province">
				<option value="">用户组</option>
				<option value="注册用户">注册用户</option>
				<option value="VIP用户">VIP用户</option>
				<option value="管理员">管理员</option>
			</select>
			</li>
		</ul>
		
		<div class="subBar">
			<ul>
				<li><div class="buttonActive"><div class="buttonContent"><button type="submit">检索</button></div></div></li>
			</ul>
		</div>
	</div>
	</form>
</div>
<div class="pageContent">
	<div class="panelBar">
		<ul class="toolBar">
			<li><a class="add" href="<?=site_url('manage/admin_caipu/caipu_add/')?>" target="navTab"><span>添加</span></a></li>
			<li class="line">line</li>
			<li><a class="icon" href="<?=site_url('manage/admin_caipu/users/ban/{sid_user}')?>" target="navTab"><span>显示</span></a></li>
			<li><a class="icon" href="<?=site_url('manage/admin_caipu/users/unban/{sid_user}')?>" target="navTab"><span>隐藏</span></a></li>
		</ul>
	</div>
	<table class="table" width="1000" layoutH="138">
		<thead>
			<tr>
				<th width="22"><input type="checkbox" group="ids" class="checkboxCtrl"></th>
				<th width="260" orderField="accountNo" class="asc">菜谱</th>
				<th width="100" orderField="accountName">创建用户</th>
				<th width="280" orderField="accountType">TIPS</th>
				<th width="50" align="center" orderField="accountCert">状态</th>
				<th width="50" align="center" orderField="accountLevel">浏览量</th>
				<th width="150" align="center">创建时间</th>
				<th>操作</th>
			</tr>
		</thead>
		<tbody>
			<?php foreach ($caipu_list as $caipu) :?>
			<?php 
			switch($caipu['status']){
				case "1": 
					$status = "显示"; 
					break; 
				case "2": 
					$status = "推荐"; 
					break; 
				default:
					$status = "隐藏"; 
					break; 
			}
			?>
			<tr target="sid_user" rel="<?=$caipu['id']?>">
				<td><input name="ids" value="<?=$caipu['id']?>" type="checkbox"></td>
				<td><a target="_blank" href="<?=site_url('recipe/'.$caipu['id'])?>"><?=$caipu['title']?></a></td>
				<td><?=$caipu['author']?></td>
				<td><?=$caipu['class_name']?></td>
				<td><?=$status?></td>
				<td><?=$caipu['views']?></td>
				<td><?=date("Y-m-d h:i", $caipu['time'])?></td>
				<td>
					<a title="删除" target="ajaxTodo" href="<?=site_url('manage/admin_caipu/caipu_del/'.$caipu['id'])?>" class="btnDel">删除</a>
					<a title="编辑" target="navTab" href="<?=site_url('manage/admin_caipu/caipu_edit/'.$caipu['id'])?>" class="btnEdit">编辑</a>
				</td>
			</tr>
			<?php endforeach;?>
		</tbody>
	</table>
	<div class="panelBar">
		<div class="pages">
			<span>18/<?=$totalCount?></span>
		</div>
		
		<div class="pagination" targetType="navTab" totalCount="<?=$totalCount?>" pageNumShown="10" currentPage="<?=$currentPage?>"></div>

	</div>
</div>
